<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<title>翔天信贷软件管理系统</title>
<link rel="stylesheet" media="screen,projection" type="text/css"
	href="css/reset.css" />
<link rel="stylesheet" media="screen,projection" type="text/css"
	href="css/main.css" />
<!--[if lte IE 6]><link rel="stylesheet" media="screen,projection" type="text/css" href="css/main-ie6.css" /><![endif]-->
<link rel="stylesheet" media="screen,projection" type="text/css"
	href="css/style.css" />
<link rel="stylesheet" media="screen,projection" type="text/css"
	href="css/mystyle.css" />
<link href="css/grid/grid.css" type="text/css" rel="stylesheet"
	media="screen" />
<link href="css/calendar.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/aa.js"></script>
<script type="text/javascript" src="js/cal.js"></script>
<style>
a{text-decoration: none;}
</style>

</head>
<body>
<html:form action="writeReceipt" method="post">
	<html:hidden property="tableID" styleId="tableID" value="" />
	<html:hidden property="callMethod" styleId="callMethod"/>
	
	
		<%@include file="/front/head.jsp"%>

	
			<div id="content" class="row">
			<br />
				<div class="column grid_16">
					<table width="100%" border="0" cellspacing="0" cellpadding="0"	style="">
						<tr>
							<td>姓名：<html:text property="userVO.user_name_search" maxlength="10"
									styleId="userVO.user_name_search" styleClass="text-input" />&nbsp;&nbsp;&nbsp;身份证号：<html:text
									property="userVO.user_sn_search"
									styleId="userVO.user_sn_search" styleClass="text-input" maxlength="18" />&nbsp;&nbsp;&nbsp;<html:submit
									property="cz" styleClass="input-submit">查找</html:submit>
							</td>
						</tr>
					</table>

					<br />
				</div>
			</div>
	
	
	
	<aa:zone name="listZone">
	
	<%@include file="receipt_head.jsp"%>

	<table width="100%" class="date" id="dataTable">
		<tr>
			<th>&nbsp;&nbsp;姓名&nbsp;&nbsp;</th>
			<th>&nbsp;&nbsp;身份证&nbsp;&nbsp;</th>
			<th>联系方式</th>
			<th>所属区域</th>
			<th>车型</th>
			<th>车价</th>
			<th>考核开始日期</th>
			<th>要求完成日期</th>
			<th>实际完成日期</th>
			<th>操作</th>	
			
			
		</tr>

		<nested:iterate id="user" name="dateReturnList" indexId="dindex">
			<tr>
				<td><nested:write name="user" property="user_name" /></td>
				<td><nested:write name="user" property="user_sn" /></td>
				<td><nested:write name="user" property="user_phone" /></td>
				<td><nested:write name="user" property="area" /></td>
				<td><nested:write name="user" property="car" /></td>
				<td><nested:write name="user" property="jg" /></td>
				<logic:equal value="10" name="buser" property="roleid">
				<td><nested:write name="user" property="gps1" /></td>
				<td><nested:write name="user" property="gps2" /></td>
				<td><nested:write name="user" property="gps3" /></td>
				</logic:equal>
				
				<logic:equal value="2" name="buser" property="roleid">
				<td><nested:write name="user" property="dk1" /></td>
				<td><nested:write name="user" property="dk2" /></td>
				<td><nested:write name="user" property="dk3" /></td>
				</logic:equal>
				
				<logic:equal value="8" name="buser" property="roleid">
				<td><nested:write name="user" property="fk1" /></td>
				<td><nested:write name="user" property="fk2" /></td>
				<td><nested:write name="user" property="fk3" /></td>
				</logic:equal>
				
				<td class="submit">
						<logic:equal value="10" name="buser" property="roleid">
							
							<nested:empty name="user" property="gps4" >
							<a id="gpstx<%=dindex%>" href=""><input type="button" value="GPS完成"  style="width:60px;"/></a>&nbsp;&nbsp;
							</nested:empty>
							
							<nested:notEmpty name="user" property="gps4" >
							<input type="button" value="GPS完成"  style="width:60px;" disabled="disabled"/>&nbsp;&nbsp;
							</nested:notEmpty>
							
							<nested:notEmpty name="user" property="gp" >
							<input type="button" value="挂牌通知财务"  style="width:80px;" disabled="disabled"/>&nbsp;&nbsp;
							</nested:notEmpty>
							<nested:empty name="user" property="gp" >
							<a id="gptx<%=dindex%>" href=""><input type="button" style="width:80px;" value="挂牌通知财务"/></a>&nbsp;&nbsp;
							</nested:empty>
						</logic:equal>
						<logic:equal value="8" name="buser" property="roleid">
							    <nested:notEqual name="user" value="0" property="bzj_true" >
							<input type="button" value="维护保证金"  style="width:80px;" disabled="disabled"/>&nbsp;&nbsp;
							</nested:notEqual>
							<nested:equal name="user" value="0" property="bzj_true" >
							 <a id="bzj<%=dindex%>" href=""><input type="button" style="width:80px;" value="维护保证金"/></a>&nbsp;&nbsp;
							</nested:equal>
							    
							  
						</logic:equal>
						
						<a href="?callMethod=getUserInfo&toNotPay=1&tableID=<nested:write name="user" property="id"/>">详情</a>
						</td>
						<script>
							$("#gptx<%=dindex%>").wBox({title: "挂牌提醒--通知财务人员",requestType:"iframe",iframeWH:{width:350,height:100},target:"writeReceipt.do?callMethod=toUpdateGptx&tableID=<nested:write name="user" property="id"/>"});
							$("#gpstx<%=dindex%>").wBox({title: "GPS已完成--通知财务人员",requestType:"iframe",iframeWH:{width:350,height:100},target:"writeReceipt.do?callMethod=toUpdateGPS4tx&tableID=<nested:write name="user" property="id"/>"});
							$("#bzj<%=dindex%>").wBox({title: "银联维护保证金",requestType:"iframe",iframeWH:{width:350,height:100},target:"writeReceipt.do?callMethod=toUpdateBzj&tableID=<nested:write name="user" property="id"/>"});
							</script>
			</tr>
		</nested:iterate>

	</table>
<br></div>
	
	
	</div>
	<%@include file="/front/nav.jsp"%>
	
	</aa:zone>
</html:form>

<script type="text/javascript">
	
	function getUserInfo(id) {
		$('#callMethod').val('getUserInfo');
		$('#tableID').val(id);
		$("form").submit();
	}
	function refresh(){
		<logic:equal value="10" name="buser" property="roleid">
		ajaxAnywhere.submitAJAX("returnToGPStx", "listZone");
		</logic:equal>
		
		<logic:equal value="2" name="buser" property="roleid">
		ajaxAnywhere.submitAJAX("returnToDktx", "listZone");
		</logic:equal>
		
		<logic:equal value="8" name="buser" property="roleid">
		ajaxAnywhere.submitAJAX("returnToFktx", "listZone");
		</logic:equal>
		
		
		
	}
	
	$(function(){
		function refresh(){
			<logic:equal value="10" name="buser" property="roleid">
			ajaxAnywhere.submitAJAX("returnToGPStx", "listZone");
			</logic:equal>
			
			<logic:equal value="2" name="buser" property="roleid">
			ajaxAnywhere.submitAJAX("returnToDktx", "listZone");
			</logic:equal>
			
			<logic:equal value="8" name="buser" property="roleid">
			ajaxAnywhere.submitAJAX("returnToFktx", "listZone");
			</logic:equal>
			
			
			
		}
		setInterval(refresh,5000);// 注意函数名没有引号和括弧！
		});
	
	$(document).ready(function(){
		refresh();
		
	})
	ajaxAnywhere.showLoadingMessage = function() {}
	
</script>


</body>
</html>